﻿using Admin.NET.Core;

namespace Admin.NET.Application.Entity;

/// <summary>
/// 设备从机模板
/// </summary>
[SugarTable("DeviceSlaveTemplate", "")]
public class DeviceSlaveTemplate : EntityBase
{
    /// <summary>
    /// 模板名称
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "SlaveName", ColumnDescription = "", Length = 60)]
    public string SlaveName { get; set; }

    /// <summary>
    /// 关联产品
    /// </summary>
    [SugarColumn(ColumnName = "RelProductId", ColumnDescription = "")]
    public long? RelProductId { get; set; }

    /// <summary>
    /// 设备模板信息Id
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "DeviceTemplateInfoId", ColumnDescription = "")]
    public long DeviceTemplateInfoId { get; set; }

    [SugarColumn(IsIgnore = true)]
    [Navigate(NavigateType.OneToMany, nameof(DeviceSlaveTemplatePoints.Id))]
    public List<DeviceSlaveTemplatePoints> DeviceSlaveTemplatePoint { get; set; } = new List<DeviceSlaveTemplatePoints>();
}